package com.qiaoba.module.job.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 定时任务日志
 *
 * @author ailanyin
 * @date 2023-09-04 09:15:09
 */
@Data
@TableName("sys_job_log")
@NoArgsConstructor
public class SysJobLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId
    @Schema(description = "日志ID")
    private String jobLogId;

    @Excel(name = "任务ID", width = 25)
    @Schema(description = "任务ID")
    private String jobId;

    @Excel(name = "任务名称", width = 25)
    @Schema(description = "任务名称")
    private String jobName;

    @Excel(name = "任务分组", width = 25)
    @Schema(description = "任务分组")
    private String jobGroup;

    @Excel(name = "执行类方法", width = 30)
    @Schema(description = "执行类方法")
    private String invokeTarget;

    @Excel(name = "日志信息", width = 30)
    @Schema(description = "日志信息")
    private String jobMessage;

    @Excel(name = "状态", replace = {"正常_1", "失败_0"})
    @Schema(description = "状态 1正常0失败")
    private String status;

    @Schema(description = "异常信息")
    private String exceptionInfo;

    @Excel(name = "开始时间", width = 30, format = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "开始时间")
    private Date startTime;

    @Excel(name = "结束时间", width = 30, format = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "结束时间")
    private Date stopTime;
}
